const action = require("../action");
module.exports = {
    "GET /studio/:studioId/service-list": async (ctx, next) => {
        console.log("ctx.params");
        console.log(ctx.params);
        let studioId = ctx.params.studioId;
        let studioData = await action.studio.getStudioPageData(studioId);
        let studioServiceData = await action.studio.getStudioService(studioId);

        ctx.render("studio-service-list.html", {
            "ui": {
                "studioTab": {
                    "state": "SERVICE",
                    "url": {
                        "main": "/studio/" + studioId + "/",
                        "service": "/studio/" + studioId + "/service-list"
                    }
                },
                "title": studioData.title,
                "env": process.env.NODE_ENV,
                "studioBanner": studioData.studioBanner
            },
            "services": studioServiceData.services,
        });
    }
};